#include "StdAfx.h"
#include "stargate.h"
#include "defender.h"
#include "machine/williamsmachine.h"

static InputPort Port1 =
	{
		{
		{"Fire",			I_B1,			0x01,	I_HIGH},
		{"Thrust",		I_B2,			0x02,	I_HIGH},
		{"Smart Bomb",	I_B3,			0x04,	I_HIGH},
		{"Hyperspace",	I_B6,			0x08,	I_HIGH},
		{"Start 2",		I_START2,	0x10,	I_HIGH},
		{"Start 1",		I_START1,	0x20,	I_HIGH},
		{"Reverse",		I_B4,			0x40,	I_HIGH},
		{"Down",			I_DOWN,		0x80,	I_HIGH},
		}
	};

static InputPort Port2 =
	{
		{
		{"Up",			I_UP,			0x01,	I_HIGH},
		{"Inviso",		I_B5,			0x02,	I_HIGH},
		{"Unknown",		0,				0x04,	I_HIGH},
		{"Unknown",		0,				0x08,	I_HIGH},
		{"Unknown",		0,				0x10,	I_HIGH},
		{"Unknown",		0,				0x20,	I_HIGH},
		{"Unknown",		0,				0x40,	I_HIGH},
		{"Unknown",		0,				0x80,	I_HIGH},
		}
	};

static highscore_t highscore[] =
	{
//	{0xB260,0x60,0x00,0x48},
	{0,-1}
	};

Cstargate::Cstargate()
{
SetName("stargate");						//set romset name
SetScreen(304,256);
SetHighScoreInfo(highscore);
SetPort(0,&Port1);
SetPort(1,&Port2);
SetPort(2,&defenderPort3);
AddROM("10",			0xD000,0x1000,0x60b07ff7,ROM_CPU1);
AddROM("11",			0xE000,0x1000,0x7d2c5daf,ROM_CPU1);
AddROM("12",			0xF000,0x1000,0xa0396670,ROM_CPU1);
AddROM("01",			0x10000,0x1000,0x88824d18,ROM_CPU1);
AddROM("02",			0x11000,0x1000,0xafc614c5,ROM_CPU1);
AddROM("03",			0x12000,0x1000,0x15077a9d,ROM_CPU1);
AddROM("04",			0x13000,0x1000,0xa8b4bf0f,ROM_CPU1);
AddROM("05",			0x14000,0x1000,0x2d306074,ROM_CPU1);
AddROM("06",			0x15000,0x1000,0x53598dde,ROM_CPU1);
AddROM("07",			0x16000,0x1000,0x23606060,ROM_CPU1);
AddROM("08",			0x17000,0x1000,0x4ec490c7,ROM_CPU1);
AddROM("09",			0x18000,0x1000,0x88187b64,ROM_CPU1);
AddROM("sg.snd",		0xF800,0x0800,0x2fcf6c4d,ROM_CPU2);
AddROM("decoder.4",	0x0000,0x0200,0xe6631c23,ROM_PROM);
AddROM("decoder.5",	0x0200,0x0200,0xf921c5fe,ROM_PROM);
}

CMachine *Cstargate::CreateMachine()
{
return(new CWilliamsMachine());
}
